from django.db import models

from utils.basemodel import BaseModel


class User(BaseModel):
    username = models.CharField(max_length=50, unique=True,null=True,blank=True,verbose_name='用户名')
    email = models.EmailField(max_length=50,unique=True,null=True,blank=True,verbose_name='邮箱')
    phone = models.CharField(max_length=11,null=True,blank=True,verbose_name='手机号')
    password = models.CharField(max_length=100,null=True,blank=True,verbose_name='密码')
    score = models.IntegerField(default=0,verbose_name='积分')
    headimg = models.CharField(max_length=200,null=True,blank=True,verbose_name='头像')
    class Meta:
        db_table = 'fguser'
    def __str__(self):
        return self.username


